3.1.64 \(\int \frac {1}{(1+\cos ^2(x))^{3/2}} \, dx\) [64]

Optimal. Leaf size=32 \[ \frac {1}{2} E\left (\left .\frac {\pi }{2}+x\right |-1\right )-\frac {\cos (x) \sin (x)}{2 \sqrt {1+\cos ^2(x)}} \]

[Out]

-1/2*(sin(x)^2)^(1/2)/sin(x)*EllipticE(cos(x),I)-1/2*cos(x)*sin(x)/(1+cos(x)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3263, 21, 3256} \begin {gather*} \frac {1}{2} E\left (\left .x+\frac {\pi }{2}\right |-1\right )-\frac {\sin (x) \cos (x)}{2 \sqrt {\cos ^2(x)+1}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + Cos[x]^2)^(-3/2),x]

[Out]

EllipticE[Pi/2 + x, -1]/2 - (Cos[x]*Sin[x])/(2*Sqrt[1 + Cos[x]^2])

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 3256

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[(Sqrt[a]/f)*EllipticE[e + f*x, -b/a], x] /
; FreeQ[{a, b, e, f}, x] && GtQ[a, 0]

Rule 3263

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Simp[(-b)*Cos[e + f*x]*Sin[e + f*x]*((a + b*Si
n[e + f*x]^2)^(p + 1)/(2*a*f*(p + 1)*(a + b))), x] + Dist[1/(2*a*(p + 1)*(a + b)), Int[(a + b*Sin[e + f*x]^2)^
(p + 1)*Simp[2*a*(p + 1) + b*(2*p + 3) - 2*b*(p + 2)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f}, x] && N
eQ[a + b, 0] && LtQ[p, -1]

Rubi steps

\begin {align*} \int \frac {1}{\left (1+\cos ^2(x)\right )^{3/2}} \, dx &=-\frac {\cos (x) \sin (x)}{2 \sqrt {1+\cos ^2(x)}}-\frac {1}{2} \int \frac {-1-\cos ^2(x)}{\sqrt {1+\cos ^2(x)}} \, dx\\ &=-\frac {\cos (x) \sin (x)}{2 \sqrt {1+\cos ^2(x)}}+\frac {1}{2} \int \sqrt {1+\cos ^2(x)} \, dx\\ &=\frac {1}{2} E\left (\left .\frac {\pi }{2}+x\right |-1\right )-\frac {\cos (x) \sin (x)}{2 \sqrt {1+\cos ^2(x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 35, normalized size = 1.09 \begin {gather*} \frac {E\left (x\left |\frac {1}{2}\right .\right )}{\sqrt {2}}-\frac {\sin (2 x)}{2 \sqrt {2} \sqrt {3+\cos (2 x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + Cos[x]^2)^(-3/2),x]

[Out]

EllipticE[x, 1/2]/Sqrt[2] - Sin[2*x]/(2*Sqrt[2]*Sqrt[3 + Cos[2*x]])

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 69 vs. \(2 (32 ) = 64\).
time = 0.43, size = 70, normalized size = 2.19

method result size
default \(-\frac {\sqrt {-\left (\sin ^{4}\left (x \right )\right )+2 \left (\sin ^{2}\left (x \right )\right )}\, \left (\sqrt {\frac {1}{2}-\frac {\cos \left (2 x \right )}{2}}\, \sqrt {-\left (\sin ^{2}\left (x \right )\right )+2}\, \EllipticE \left (\cos \left (x \right ), i\right )+\left (\sin ^{2}\left (x \right )\right ) \cos \left (x \right )\right )}{2 \sqrt {1-\left (\cos ^{4}\left (x \right )\right )}\, \sin \left (x \right ) \sqrt {1+\cos ^{2}\left (x \right )}}\) \(70\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1+cos(x)^2)^(3/2),x,method=_RETURNVERBOSE)

[Out]

-1/2*(-sin(x)^4+2*sin(x)^2)^(1/2)*((sin(x)^2)^(1/2)*(-sin(x)^2+2)^(1/2)*EllipticE(cos(x),I)+sin(x)^2*cos(x))/(
1-cos(x)^4)^(1/2)/sin(x)/(1+cos(x)^2)^(1/2)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)^2)^(3/2),x, algorithm="maxima")

[Out]

integrate((cos(x)^2 + 1)^(-3/2), x)

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 247 vs. \(2 (31) = 62\).
time = 0.13, size = 247, normalized size = 7.72 \begin {gather*} \frac {{\left ({\left (2 i \, \sqrt {2} - 3 i\right )} \cos \left (x\right )^{2} + 2 i \, \sqrt {2} - 3 i\right )} \sqrt {2 \, \sqrt {2} - 3} E(\arcsin \left (\sqrt {2 \, \sqrt {2} - 3} {\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right )}\right )\,|\,12 \, \sqrt {2} + 17) + {\left ({\left (-2 i \, \sqrt {2} + 3 i\right )} \cos \left (x\right )^{2} - 2 i \, \sqrt {2} + 3 i\right )} \sqrt {2 \, \sqrt {2} - 3} E(\arcsin \left (\sqrt {2 \, \sqrt {2} - 3} {\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right )}\right )\,|\,12 \, \sqrt {2} + 17) - 4 \, {\left ({\left (-i \, \sqrt {2} - 3 i\right )} \cos \left (x\right )^{2} - i \, \sqrt {2} - 3 i\right )} \sqrt {2 \, \sqrt {2} - 3} F(\arcsin \left (\sqrt {2 \, \sqrt {2} - 3} {\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right )}\right )\,|\,12 \, \sqrt {2} + 17) - 4 \, {\left ({\left (i \, \sqrt {2} + 3 i\right )} \cos \left (x\right )^{2} + i \, \sqrt {2} + 3 i\right )} \sqrt {2 \, \sqrt {2} - 3} F(\arcsin \left (\sqrt {2 \, \sqrt {2} - 3} {\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right )}\right )\,|\,12 \, \sqrt {2} + 17) - 2 \, \sqrt {\cos \left (x\right )^{2} + 1} \cos \left (x\right ) \sin \left (x\right )}{4 \, {\left (\cos \left (x\right )^{2} + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)^2)^(3/2),x, algorithm="fricas")

[Out]

1/4*(((2*I*sqrt(2) - 3*I)*cos(x)^2 + 2*I*sqrt(2) - 3*I)*sqrt(2*sqrt(2) - 3)*elliptic_e(arcsin(sqrt(2*sqrt(2) -
 3)*(cos(x) + I*sin(x))), 12*sqrt(2) + 17) + ((-2*I*sqrt(2) + 3*I)*cos(x)^2 - 2*I*sqrt(2) + 3*I)*sqrt(2*sqrt(2
) - 3)*elliptic_e(arcsin(sqrt(2*sqrt(2) - 3)*(cos(x) - I*sin(x))), 12*sqrt(2) + 17) - 4*((-I*sqrt(2) - 3*I)*co
s(x)^2 - I*sqrt(2) - 3*I)*sqrt(2*sqrt(2) - 3)*elliptic_f(arcsin(sqrt(2*sqrt(2) - 3)*(cos(x) + I*sin(x))), 12*s
qrt(2) + 17) - 4*((I*sqrt(2) + 3*I)*cos(x)^2 + I*sqrt(2) + 3*I)*sqrt(2*sqrt(2) - 3)*elliptic_f(arcsin(sqrt(2*s
qrt(2) - 3)*(cos(x) - I*sin(x))), 12*sqrt(2) + 17) - 2*sqrt(cos(x)^2 + 1)*cos(x)*sin(x))/(cos(x)^2 + 1)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (\cos ^{2}{\left (x \right )} + 1\right )^{\frac {3}{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)**2)**(3/2),x)

[Out]

Integral((cos(x)**2 + 1)**(-3/2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)^2)^(3/2),x, algorithm="giac")

[Out]

integrate((cos(x)^2 + 1)^(-3/2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \frac {1}{{\left ({\cos \left (x\right )}^2+1\right )}^{3/2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(x)^2 + 1)^(3/2),x)

[Out]

int(1/(cos(x)^2 + 1)^(3/2), x)

________________________________________________________________________________________